package com.eduhzy.ttw.teacher.mvp.model;

import com.eduhzy.ttw.commonsdk.entity.CommonData;
import com.eduhzy.ttw.commonsdk.entity.PlatformNoticeData;
import com.eduhzy.ttw.commonsdk.http.CommonApi;
import com.eduhzy.ttw.teacher.mvp.contract.PlatformNoticeContract;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;

import java.util.List;
import java.util.Map;

import javax.inject.Inject;

import io.reactivex.Observable;

/**
 * @author xubo
 * @date 2018-7-20 16:41:22
 */
@ActivityScope
public class PlatformNoticeModel extends BaseModel implements PlatformNoticeContract.Model {


    @Inject
    public PlatformNoticeModel(IRepositoryManager repositoryManager) {
        super(repositoryManager);
    }

    @Override
    public Observable<CommonData<List<PlatformNoticeData>>> getSendMsgList(Map<String, Object> map) {
        return mRepositoryManager.obtainRetrofitService(CommonApi.class).getSendMsgList(map);
    }

    @Override
    public Observable<CommonData<Map>> markRead(Map<String, Object> map) {
        return mRepositoryManager.obtainRetrofitService(CommonApi.class).markRead(map);
    }
}